<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>弹性盒模型布局</title>
	<style type="text/css">
		
		ul{
			margin:0;
			padding:0;
			list-style:none;
			width:500px;
			border:5px solid #000;
			background-color:gold;
			margin:50px auto 0;			
			display:flex;
			justify-content:space-between;			
		}

		ul li{
			width:50px;
			height:50px;
			margin:10px;
			line-height:50px;
			text-align:center;
			color:#fff;
			background-color:green;		
			
		}

		ul li:nth-child(1){
			order:2;
		}
		ul li:nth-child(2){
			order:1;
		}
		ul li:nth-child(3){
			order:4;
		}
		ul li:nth-child(4){
			order:3;
		}
		ul li:nth-child(5){
			order:5;
		}







	





	</style>

</head>
<body>
	<ul>
		<li>1</li>
		<li>2</li>
		<li>3</li>
		<li>4</li>
		<li>5</li>
		
	</ul>
</body>
</html>